package io.renren.modules.course.service.impl;

import io.renren.modules.course.entity.PlanScorePojo;
import io.renren.modules.student.entity.TeachPlanEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.course.dao.PlanScoreDao;
import io.renren.modules.course.entity.PlanScoreEntity;
import io.renren.modules.course.service.PlanScoreService;


@Service("planScoreService")
public class PlanScoreServiceImpl extends ServiceImpl<PlanScoreDao, PlanScoreEntity> implements PlanScoreService {
    @Autowired PlanScoreDao planScoreDao;
    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<PlanScoreEntity> page = this.selectPage(
                new Query<PlanScoreEntity>(params).getPage(),
                new EntityWrapper<PlanScoreEntity>()
        );

        return new PageUtils(page);
    }

//    @Override
//    public List  planScoreList(Map<String, Object> params) {
//        return planScoreDao.planScoreList(params);
//    }
    @Override
    public PageUtils getListBySchoolId(Map<String,Object>  planScore) {
        PageUtils page=new PageUtils();
        page.setList(planScoreDao.planScoreList(planScore));
        page.setTotalCount(planScoreDao.getTotalBySchoolId(planScore));
        return page;
    }

    @Override
    public PlanScorePojo getOne(PlanScoreEntity planScore) {
        return planScoreDao.getOne(planScore);
    }


}
